<template>
  <a-config-provider
      :theme="themeConfig"
  >
  </a-config-provider>
</template>

<script lang="ts" setup>
import { theme } from 'ant-design-vue';
import themes from '../../../public/config/theme';
import useStore from "@/store";
import {computed} from "vue";

const {webConfig}  = useStore()
const themeConfig = computed(() => {
  return {
    ...themes,
    "algorithm": algorithm.value
  }
})
const algorithm = computed(() => {

  // const t = []
  // if(webConfig.isDarkColor)
  //   t.push(theme.darkAlgorithm)
  // if(webConfig.isMobile){
  //   t.push(theme.compactAlgorithm)
  // }else
  //   t.push(theme.defaultAlgorithm)
  //
  // return t;
  return webConfig.isDarkColor ? theme.darkAlgorithm : theme.defaultAlgorithm;
})

</script>
